package com.example.gbasedemo.control;

import com.example.gbasedemo.mapper.TestPojo;
import com.example.gbasedemo.service.ServiceTest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class TestControl {

    @Autowired
    private ServiceTest serviceTest;

    @GetMapping("/test")
    public Integer test() {
        return serviceTest.test();
    }

    @GetMapping("/test/select")
    public TestPojo select() {
        return serviceTest.selectRow();
    }
}
